package com.ruoyi.qiushi.service.equipment.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.qiushi.domain.equipment.QiushiDeviceBindRecord;
import com.ruoyi.qiushi.mapper.equipment.QiushiDeviceBindRecordMapper;
import com.ruoyi.qiushi.service.equipment.IQiushiDeviceBindRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 设备列Service业务层处理
 *
 * @author ruoyi
 * @date 2024-02-28
 */
@Service
public class QiushiDeviceBindRecordServiceImpl implements IQiushiDeviceBindRecordService {
    @Autowired
    private QiushiDeviceBindRecordMapper qiushiDeviceBindRecordMapper;

    /**
     * 查询设备列
     *
     * @param id 设备列主键
     * @return 设备列
     */
    @Override
    public QiushiDeviceBindRecord selectQiushiDeviceBindRecordById(Long id) {
        return qiushiDeviceBindRecordMapper.selectQiushiDeviceBindRecordById(id);
    }

    /**
     * 查询设备列列表
     *
     * @param qiushiDeviceBindRecord 设备列
     * @return 设备列
     */
    @Override
    public List<QiushiDeviceBindRecord> selectQiushiDeviceBindRecordList(QiushiDeviceBindRecord qiushiDeviceBindRecord) {
        return qiushiDeviceBindRecordMapper.selectQiushiDeviceBindRecordList(qiushiDeviceBindRecord);
    }

    /**
     * 新增设备列
     *
     * @param qiushiDeviceBindRecord 设备列
     * @return 结果
     */
    @Override
    public int insertQiushiDeviceBindRecord(QiushiDeviceBindRecord qiushiDeviceBindRecord) {
        qiushiDeviceBindRecord.setCreateTime(DateUtils.getNowDate());
        return qiushiDeviceBindRecordMapper.insertQiushiDeviceBindRecord(qiushiDeviceBindRecord);
    }

    /**
     * 修改设备列
     *
     * @param qiushiDeviceBindRecord 设备列
     * @return 结果
     */
    @Override
    public int updateQiushiDeviceBindRecord(QiushiDeviceBindRecord qiushiDeviceBindRecord) {
        qiushiDeviceBindRecord.setUpdateTime(DateUtils.getNowDate());
        return qiushiDeviceBindRecordMapper.updateQiushiDeviceBindRecord(qiushiDeviceBindRecord);
    }

    /**
     * 批量删除设备列
     *
     * @param ids 需要删除的设备列主键
     * @return 结果
     */
    @Override
    public int deleteQiushiDeviceBindRecordByIds(Long[] ids) {
        return qiushiDeviceBindRecordMapper.deleteQiushiDeviceBindRecordByIds(ids);
    }

    /**
     * 删除设备列信息
     *
     * @param id 设备列主键
     * @return 结果
     */
    @Override
    public int deleteQiushiDeviceBindRecordById(Long id) {
        return qiushiDeviceBindRecordMapper.deleteQiushiDeviceBindRecordById(id);
    }
}
